#pragma once

#define DIRECTINPUT_VERSION 0x0800
#include <dinput.h>
#pragma comment(lib, "dinput8.lib")
#pragma comment(lib, "dxguid.lib")

#include "Structures.h"

class D_Input
{
private:
	IDirectInput8 * m_pDIObject;
	IDirectInputDevice8 * m_pDIKeyboard, * m_pDIMouse;
	DIMOUSESTATE2 mouseState;
	MouseInfo info;
	POINT stuckPosP;
	XY stuckPosXY;
	char keyBuffer[256];
	bool mHidden;
private:
	D_Input();
public:
	static D_Input* getInstance()	{static D_Input instance; return &instance;}
	bool Update();
	MouseInfo getMouseInfo()	{return info;}
	void hideCursor();
	void showCursor();
};